home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Examples / Draw / Include / FWRuler.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  2.0 KB  |  75 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWRuler.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWRULER_H
  11. #define FWRULER_H
  12.  
  13. #ifndef FWVIEW_H
  14. #include "FWView.h"
  15. #endif
  16.  
  17. #ifndef FWRUNTYP_H
  18. #include "FWRunTyp.h"
  19. #endif
  20.  
  21. #if FW_LIB_EXPORT_PRAGMAS
  22. #pragma lib_export on
  23. #endif
  24.  
  25. //========================================================================================
  26. //    Forward Class Definitions
  27. //========================================================================================
  28.  
  29. class FW_CLASS_ATTR FW_PFont;
  30. class FW_CLASS_ATTR FW_CFrame;
  31. class FW_CLASS_ATTR FW_CPictureShape;
  32.  
  33. //========================================================================================
  34. //    CLASS FW_CRuler
  35. //========================================================================================
  36.  
  37. class FW_CLASS_ATTR FW_CRuler : public FW_CView
  38. {
  39. public:
  40.     FW_DECLARE_CLASS
  41.  
  42. //----------------------------------------------------------------------------------------
  43. //    Initialization/destruction
  44. //
  45. public:
  46.     FW_CRuler(Environment* ev, 
  47.                 FW_CView* container, 
  48.                 const FW_CRect& bounds, 
  49.                 int contentSpace);
  50.     virtual ~FW_CRuler();    
  51.  
  52. //----------------------------------------------------------------------------------------
  53. //    Inherited API
  54. //
  55. public:
  56.     virtual void     Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
  57.  
  58. //----------------------------------------------------------------------------------------
  59. //    New API
  60. //
  61. protected:
  62.     void     RenderHorizontalRuler(FW_CViewContext& vc, const FW_CRect& visibleRect);
  63.     void     RenderVerticalRuler(FW_CViewContext& vc, const FW_CRect& visibleRect);
  64.     void    RenderGradation(FW_CViewContext& vc,
  65.                         short gradation, 
  66.                         const FW_PFont& font, 
  67.                         const FW_CPoint& pos);
  68. };
  69.  
  70. #if FW_LIB_EXPORT_PRAGMAS
  71. #pragma lib_export off
  72. #endif
  73.  
  74. #endif
  75.